﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using FrbaBus.UserInterface.ABM.Rol;
using FrbaBus.UserInterface.ABM.Roles;
using FrbaBus.UserInterface.ABM.Micro;
using FrbaBus.UserInterface.ABM.Ciudades;
using FrbaBus.UserInterface.ABM.Recorrido;
using FrbaBus.UserInterface;
using FrbaBus.UserInterface.Registrar_llegada_micro;
using FrbaBus.UserInterface.Cancelar_viaje;
using FrbaBus.UserInterface.Consulta_de_pts;

namespace FrbaBus
{
    public partial class MenuPrincipal : Form
    {
        public int passLogin;

        public MenuPrincipal()
        {
            InitializeComponent();
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            gestionDeRolesGroupBox.Visible = false;
            gestionDeMicrosGroupBox.Visible = false;
            gestionDeCiudadesGroupBox.Visible = false;
            gestionDeRecorridosGroupBox.Visible = false;
            gestionDeViajesGroupBox.Visible = false;
            listadoEstadisticoButton.Visible = false;
            cancelarCompraButton.Visible = false;
            usuarioLabel.Text = "Cliente";
            puntosLabel.Text = "Cambie sus \n puntos ahora!";
            compraLabel.Text = "Encuentre \n el mejor precio";
        }

        public MenuPrincipal(int passLogin)
        {
            InitializeComponent();
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.passLogin = passLogin;
            usuarioLabel.Text = "Administrador";
            loginButton.Text = "Logout";

        }



        private void altaRolButton_Click(object sender, EventArgs e)
        {
            new AltaRol().Show();
        }

        private void altaMicroButton_Click(object sender, EventArgs e)
        {
            new AltaMicro().Show();
        }

        private void bajaRolButton_Click(object sender, EventArgs e)
        {
            new bajaModificacionRol().Show();
        }

        private void altaCiudadesButton_Click(object sender, EventArgs e)
        {
            new AltaCiudades().Show();
        }

        private void bajaCiudadesButton_Click(object sender, EventArgs e)
        {
            new bajaModificacionCiudades().Show();
        }

        private void modificacionRolButton_Click(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void loginButton_Click(object sender, EventArgs e)
        {
            if (loginButton.Text == "Login")
            {
                new Login().Show();
                this.Hide();
            }
            else
            {
                new MenuPrincipal().Show();
                this.Hide();
            }
        }

        private void bajaMicroButton_Click(object sender, EventArgs e)
        {

        }

        private void MenuPrincipal_Load(object sender, EventArgs e)
        {

        }


        private void gestionDeRolesGroupBox_Enter(object sender, EventArgs e)
        {

        }

        private void altaRecorridosButton_Click(object sender, EventArgs e)
        {
            new AltaRecorrido().Show();
        }

        private void registrarLlegadaButton_Click(object sender, EventArgs e)
        {
            new registrarLlegada().Show();
        }

        private void consultaPuntosButton_Click(object sender, EventArgs e)
        {
            new ConsultaDePtos().Show();
        }

        private void cancelarCompraButton_Click(object sender, EventArgs e)
        {
            new CancelarViaje().Show();
        }

    }
}